package com.wt.springsamples.config;

public class HttpClientProperties {
    private String keystorePath;
    private String keystorePassword;
    private String truststorePath;
    private String truststorePassword;
    private Request request = new Request();
    private Pool pool = new Pool();
    public String getKeystorePath(){ return keystorePath; }
    public void setKeystorePath(String keystorePath){ this.keystorePath = keystorePath; }
    public String getKeystorePassword(){ return keystorePassword; }

    public void setKeystorePassword(String keystorePassword){this.keystorePassword=keystorePassword;}
    public String getTruststorePath(){ return truststorePath; }
    public void setTruststorePath(String truststorePath){ this.truststorePath = truststorePath; }
    public String getTruststorePassword(){ return truststorePassword; }
    public void setTruststorePassword(String truststorePassword) { this.truststorePassword = truststorePassword; }

    public Request getRequest(){ return request; }

    public void setRequest(Request request){ this.request = request; }

    public Pool getPool(){ return pool; }
    public void setPool(Pool pool){ this.pool = pool; }


    public static class Request {
        private Integer maxRetryTime =3;
        private Integer socketTimeout = 8000;
        private Integer connectTimeout= 8000;
        private Integer connectionRequestTimeout=8000;

        public Integer getMaxRetryTime(){ return maxRetryTime; }
        public void setMaxRetryTime(Integer maxRetryTime){ this.maxRetryTime = maxRetryTime; }
        public Integer getSocketTimeout(){return socketTimeout; }
        public void setSocketTimeout(Integer socketTimeout){ this.socketTimeout = socketTimeout; }
        public Integer getConnectTimeout(){ return connectTimeout; }
        public void setConnectTimeout(Integer connectTimeout){ this.connectTimeout = connectTimeout; }
        public Integer getConnectionRequestTimeout(){ return connectionRequestTimeout; }
        public void setConnectionRequestTimeout(Integer connectionRequestTimeout){this.connectionRequestTimeout = connectionRequestTimeout;}
    }

    public static class Pool {
        private Integer maxTotal=1000;
        private Integer defaultMaxPerRoute=200;
        public Integer getMaxTotal(){ return maxTotal; }
        public void setMaxTotal(Integer maxTotal){ this.maxTotal = maxTotal; }
        public Integer getDefaultMaxPerRoute(){ return defaultMaxPerRoute; }
        public void setDefaultMaxPerRoute(Integer defaultMaxPerRoute) { this.defaultMaxPerRoute = defaultMaxPerRoute;}
    }
}
